<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ page import="javax.portlet.*"%>
<%@ page import="com.test.TavernaServer" %>
<%@ page import="java.util.Vector" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="tavernacon.*" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

<portlet:defineObjects />
<%PortletPreferences prefs = renderRequest.getPreferences();%>
<% PortletSession pSession = renderRequest.getPortletSession();%>

<% Vector outputs = TavernaServer.getOutputs(renderRequest.getPortletSession());%>
<style type="text/css">q {color:#3366CC; font-size:22px}r {color:#666666;}r.value {font-style:italic;color:#666666} table, td{border:0px solid black;}td{padding:4px;}</style>

<form method="post" action="<portlet:actionURL/>">
    <table cellspacing="3">
        <tr><td><b>Job ID:</b></td>
            <td><input type="text" name="resultsJobID"></td>
            <td><input type="submit" value="Submit"/></td>
        </tr>
    </table>
</form>

<br/>

<q>Job <%=pSession.getAttribute("selectedJobID")%> </q><r class="value"><%=pSession.getAttribute("status")%></r>
<br/>
<% if(outputs.isEmpty()){%>
    No outputs
    <%}%>
<table cellspacing="3">

    <% Iterator itr = outputs.iterator();
            while (itr.hasNext()) {%>
    <tr><td><%= itr.next()%></td></tr>
    <% }%>

</table>